<?php 
$order = $this->order;
$items = $this->items;
$status = $this->status; 
$shipping = $this->shipping;
$method = $this->method;
$state = $this->state;
?>
<script type="text/javascript">
<!--
$(document).ready(function(){
	Order.initPackageDialog();
});
//-->
</script>
<div class='center_form'>
    <div class="center_form_right">
    	<?php if($this->nextString!=''){?>
        <div class='center_form_btn_div' onclick='javascript:Common.submit();$(this).attr("onclick","");'>
            <div class='center_form_btn_pic'>
                <img src='<?php echo HttpUtil::baseUrl();?>/images/save.gif'/>
            </div><div class='center_form_btn_text'><?php echo $this->translate($this->nextString); ?></div>
        </div>
        <?php }?>
        <div class='center_form_btn_div'  onclick='javascript:Common.gotoUrl("<?php echo HttpUtil::baseUrl(); ?>/order/order/return");'>
            <div class='center_form_btn_pic'>
                <img src='<?php echo HttpUtil::baseUrl();?>/images/cancel.gif'/>
            </div><div class='center_form_btn_text'><?php echo $this->translate("cancelBtn"); ?></div>
        </div>
    </div>
</div>


<div class="centerbig_form" style="margin-bottom:10px;">
    <div class="center_top"><span class="center_top_title"><?php echo $this->translate("normalInfo"); ?></span></div>
  
        <div class="right_form_content">            
               <div class="form_content">
					
                    <form action="<?php echo HttpUtil::baseUrl(); ?>/order/order/subrefund" method="post" id="editorder"> 
                    	<input type="hidden" id="nextString" name="nextString" value="<?php echo $this->nextString;?>" />
                    	<input type="hidden" id="orderId" name="orderId" value="<?php echo $this->order['id'];?>" />
                    	<table class="order_table"  cellspacing="0" cellpadding="0" border="0">
                          <tr>
                          	<td class="table_header">订单Id(<?php echo $this->translate("orderno"); ?>): </td>
                          	<td><?php echo $this->order['id'];?>(<?php echo $this->order['order_num'];?>)</td>
                          	<td class="table_header"><?php echo $this->translate("orderUser"); ?>: </td>
                          	<td><?php echo $this->order['user_name'];?></td>
                          	<td class="table_header"><?php echo $this->translate("status"); ?>: </td>
                          	<td><?php echo OrderConstant::getStatus($this->order['status']);?></td>
                          </tr>
                          <tr>
                          	<td class="table_header"><?php echo $this->translate("shippingFee"); ?>: </td>
                          	<td><?php echo $this->order['shipping_fee'];?></td>
                          	<td class="table_header"><?php echo $this->translate("discountFee"); ?>: </td>
                          	<td><?php echo $this->order['discount_fee'];?></td>
                          	<td class="table_header"><?php echo $this->translate("merchandiseTotalFee"); ?>: </td>
                          	<td><?php echo $this->order['merchandise_total'];?></td>
                          </tr>
                          <tr>
                          	<td class="table_header"><?php echo $this->translate("totalFee"); ?>: </td>
                          	<td><font color="red"><?php echo $this->order['total'];?></font></td>
                          	<td class="table_header">&nbsp;</td>
                          	<td>&nbsp;</td>
                          	<td class="table_header">&nbsp;</td>
                          	<td>&nbsp;</td>
                          </tr>
                          <tr>
                          	<td class="table_header"><?php echo $this->translate("shippingExpect"); ?>: </td>
                          	<td><?php echo OrderConstant::getShippingExpect($this->order['shipping_expect']);?></td>
                          	<td class="table_header"><?php echo $this->translate("paymentMethod"); ?>: </td>
                          	<td><?php echo OrderConstant::getPaymentMethod($this->order['payment_method']);?></td>
                          	<td class="table_header"><?php echo $this->translate("invoice"); ?>: </td>
                          	<td><?php echo $this->order['invoice'];?></td>
                          </tr>
                          <tr>
                          	<td class="table_header"><?php echo $this->translate("returnStatus"); ?>: </td>
                          	<td><font color="red"><?php echo $this->translate("returnStatus_".$this->order['is_returned']);?></font></td>
                          	<td class="table_header">下单时间:</td>
                          	<td><?php echo $this->order["created"]; ?></td>
                          	<td class="table_header">&nbsp;</td>
                          	<td>&nbsp;</td>
                          </tr>
                          </table>                          
                    </form>
               </div>       
            </div>
        <div class="clear"></div>      
</div>           
<div class="centerbig_form" style="margin-bottom:10px;">
    <div class="center_top"><span class="center_top_title"><?php echo $this->translate("shippingInfo"); ?></span></div>
    <div class="right_form_content">              
		   <div class="form_content">
		          <table class="order_table">
		              <?php if($this->order['area_name']!=''){?>
                      <tr>
                      	<td class="table_header"><?php echo $this->translate("areaName"); ?>: </td>
                      	<td><?php echo $this->order['area_name'];?></td>
                      	<td class="table_header"><?php echo $this->translate("agentName"); ?>: </td>
                      	<td><?php echo $this->order['agent_name'];?></td>
                      	<td class="table_header"><?php echo $this->translate("agentPhone1"); ?>: </td>
                      	<td><?php echo $this->order['agent_mobile'];?></td>
                      </tr>
                      <tr>
                      	<td class="table_header"><?php echo $this->translate("agentPhone2"); ?>: </td>
                      	<td><?php echo $this->order['agent_phone'];?></td>
                      	<td class="table_header"><?php echo $this->translate("agentPostalCode"); ?>: </td>
                      	<td><?php echo $this->order['agent_postal_code'];?></td>
                      	<td class="table_header">&nbsp;</td>
                      	<td>&nbsp;</td>
                      </tr>
                      <tr>
                		<td class="table_header"><?php echo $this->translate("agentAddress"); ?>: </td>
                      	<td colspan="5"><?php echo $this->order['agent_city'].$this->order['agent_district'].$this->order['agent_addr'];?></td>
                      </tr>
                      <?php }?>
                      <tr>
                      	<td class="table_header"><?php echo $this->translate("deliveryName"); ?>: </td>
                      	<td><?php echo $this->order['delivery_name'];?></td>
                      	<td class="table_header"><?php echo $this->translate("deliveryPhone1"); ?>: </td>
                      	<td><?php echo $this->order['delivery_phone1'];?></td>
                      	<td class="table_header"><?php echo $this->translate("deliveryPhone2"); ?>: </td>
                      	<td><?php echo $this->order['delivery_phone2'];?></td>
                      </tr>
                      <tr>
                		<td class="table_header"><?php echo $this->translate("deliveryAddress"); ?>: </td>
                      	<td colspan="5"><?php echo $this->order['datitle1'].$this->order['datitle2'].$this->order['datitle3'].$this->order['delivery_detail_address'];?></td>
                      </tr>
                      <tr>
                      	<td class="table_header"><?php echo $this->translate("deliveryEmail"); ?>: </td>
                      	<td><?php echo $this->order['delivery_email'];?></td>
                      	<td class="table_header">&nbsp;</td>
                      	<td>&nbsp;</td>
                      	<td class="table_header">&nbsp;</td>
                      	<td>&nbsp;</td>
                      </tr>
                      <tr>
                        <td class="table_header"><?php echo $this->translate("remark"); ?>: </td>
                        <td colspan="5"><font color="blue"><?php echo $this->order['remark'];?></font></td>
                      </tr>                       
                  </table> 
           </div>
    </div>
    <div class="clear"></div>      
</div>  
<div class="centerbig_form" style="margin-bottom:10px;">
    <div class="center_top"><span class="center_top_title"><?php echo $this->translate("productInfo"); ?></span></div>
    <div class="right_form_content">     
        <div id="itemsPanel" class="itemsPanel form_content">
        </div>          
        <script type="text/javascript">
        	Order.getItemsPanel('<?php echo HttpUtil::baseUrl();?>',<?php echo $this->order['id'];?>,'<?php echo $this->edit;?>');
        </script>
    </div>
    <div class="clear"></div>      
</div>

<!-- Operation Log Start -->
<div class="centerbig_form" style="margin-bottom:10px;">
    <div class="center_top"><span class="center_top_title"><?php echo $this->translate("operationLog"); ?></span></div>
    <div class="right_form_content">     
        <div id="operation_log_list" class="itemsPanel form_content">
        </div>
        <div>
           
            <div class="form_line_div">
                 <div class="form_element_label"><?php echo $this->translate("operator"); ?>:</div>
                 <div class="form_element">
                     <select id="operator" name="operator">
                         <option  value=""><?php echo $this->translate("selectLabel"); ?></option>
                         <?php foreach ($this->admins as $admin){?>
                             <option value="<?php echo $admin['id'];?>"><?php echo $admin['username'];?></option>
                         <?php }?>
                     </select>
                 </div>
                 <div class="clear" ></div>
                 <div class="form_line_div">
                     <div id="operator_error" class="form_element_error" style="margin-left:120px;"></div>
                 </div>
                 <div class="clear"></div>
                  <br/>
                 <div class="form_line_div">
                     <div class="form_element_label"><?php echo $this->translate("operationContent");?>:</div>
                     <div class="form_element">
                         <textarea id="content" cols="50" rows="3" name="content"></textarea>
                     </div>
                 </div>
                 <div class="clear"></div>
                 <div class="form_line_div">
                     <div id="content_error" class="form_element_error" style="margin-left:120px;" ></div>
                 </div>
                 <div class="clear"></div>
                
                 <div class="form_line_div" style="margin: 10px 0 20px 136px;">
                     <input type="button" value="<?php echo $this->translate("confirmSubmit");?>" onclick="javascript:Order.journalSubmit('<?php echo HttpUtil::baseUrl()?>')" />
                 </div>
                 <div class="clear"></div>
            </div>
           
        </div>          
        <script type="text/javascript">
        	Order.getOrderOperationJournal('<?php echo HttpUtil::baseUrl();?>',<?php echo $this->order['id'];?>);
        </script>
    </div>
    <div class="clear"></div>      
</div> 
<input type="hidden" id="operatorEmpty"  value="<?php echo $this->translate("operatorEmptyErr");?>" /> 
<input type="hidden" id="contentEmpty"  value="<?php echo $this->translate("contentEmptyErr");?>" /> 
<input type="hidden" id="order_status" value="<?php echo $this->order['status']?>" />      

<!-- Operation Log End -->           


<div id="package_dialog">

</div>